import Vue from 'vue'
import App from './App.vue'
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import router from './router'
import store from './store'


import './lib/veevalidate' // 引入验证规则
import filters from './lib/filter'
import directives from './lib/directives'
import Alert from '_c/modules/alert'
import Pop from '_c/modules/pop'
Vue.use(ElementUI);
Vue.use(Alert)
Vue.use(Pop)

// 循环注册过滤器
Object.keys(filters).forEach(key => {
  Vue.filter(key, filters[key])
})

// 循环创建自定义指令
Object.keys(directives).forEach(key => {
  Vue.directive(key, directives[key])
})

Vue.config.productionTip = false

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
